package com.xframe.domain.e3sp.basedata;

import com.xframe.domain.BaseModel;
import com.xframe.xdal.core.annotation.*;
import com.xframe.xdal.core.constant.AutoFillType;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @Description: 车系基础表
 * @ClassName: com.xframe.domain.e3sp.basedata.Series
 * @Author: xufeng
 * @CreateTime: 2023/11/27
 **/
@Data
@Accessors(chain=true)
@XTable(value = "p_t02_series", label = "车系")
@XSelectItem(keyName = "seriesId",codeName = "seriesCode",textName = "nameCn")
@XSelectItem(keyName = "seriesId",codeName = "seriesCode",textName = "nameEn",language = "en")
@XBelongsTo(typeName = "com.xframe.domain.e3sp.basedata.Brand",foreignKey = "brandId", targetKey = "brandId",as = "refBrand")
public class Series extends BaseModel {

    /**
     * 车系ID
     */
    @AutoFill(AutoFillType.Snowflake)
    @XColumn(name = "series_id", primaryKeyFlag = true,desc = "车系ID")
    private Long seriesId;

    /**
     * 品牌ID
     */
    @XQueryCondition
    @XColumn(name = "brand_id",desc = "品牌ID")
    private Long brandId;

    /**
     * 车系编码
     */
    @XQueryCondition
    @XGridTableRef
    @XColumn(name = "series_code", uniqueFlag = true,desc = "车系编码",length = 200)
    private String seriesCode;


    /**
     * 中文名称
     */
    @XQueryCondition
    @XGridTableRef
    @XColumn(name = "name_cn",desc = "车系中文名称",length = 200)
    private String nameCn;

    /**
     * 英文名称
     */
    @XColumn(name = "name_en",desc = "车系英文名称",nullFlag = true,length = 200)
    private String nameEn;


    /**
     * 所属品牌
     */
    private Brand refBrand;
}
